{% extends "base.html" %}
{% load humanize %}
{% block title %}Photos{% endblock %}
{% block css %}photos.css{% endblock %}
{% block content %}
	<div class="gallery">
		<div class="title">
			<a href="{{ key.get_absolute_url }}">{{ key.title }}</a>
			<span>
				{% if key.photos.all|length_is:"1" %}
					({{ key.photos.all|length|apnumber }} photo)
				{% else %}
					({{ key.photos.all|length|apnumber }} photos)
				{% endif %}
			</span>
		</div>
		{% if key.photoset_description %}
			<div class="description">
				{{ key.photoset_description }}
			</div>
		{% endif %}
		<ul class="featured_photos">
			{% for photo in key.photos.all %}
				<li>
					<a href="{{ photo.get_absolute_url }}">
						<img alt="{{ photo.title }}" src="{{ MEDIA_URL }}{{ photo.thumbnail_image }}" />
					</a>
				</li>
			{% endfor %}
		</ul>
	</div>
{% endblock %}